package Power_Adapter_07;

public class PowerApplication {
    public static void main(String[] args) {
        // 创建一个220V电源
        PowerSource220V powerSource = new PowerSource220V();

        // 使用适配器将220V转换为5V
        VoltageAdapter adapter = new VoltageAdapter(powerSource);
        int outputVoltage = adapter.output5V();

        // 输出转换后的电压
        System.out.println("适配器输出电压: " + outputVoltage + "V");
    }
}
